<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            border:solid 1px #ddd;
            margin-bottom: 20px;
            background: url('http://cdn.xiaohigh.com/logo.png');
        }
        /* 当设备像素比 >= 2 的时候, 内部的样式会生效 */
        @media screen and (-webkit-min-device-pixel-ratio: 2) {
            .box2{
                background: url('http://cdn.xiaohigh.com/logo@2x.png');
                background-size: cover;
            }
        }

        /* 当设备像素比 >= 3 的时候, 内部的样式会生效 */
        @media screen and (-webkit-min-device-pixel-ratio: 3) {
            .box2{
                background: url('http://cdn.xiaohigh.com/logo@3x.png');
                background-size: cover;
            }
        }
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>
</body>
</html>